home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1432.dms / var1432.adf / NDUK-V40.lha / V40 / include / intuition / intuition.i < prev    next >
Text File  |  1993-10-15  |  63KB  |  1,635 lines

  1.     IFND    INTUITION_INTUITION_I
  2. INTUITION_INTUITION_I    SET    1
  3. **
  4. **    $VER: intuition.i 38.26 (11.8.93)
  5. **    Includes Release 40.15
  6. **
  7. **    Interface definitions for Intuition applications
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND EXEC_TYPES_I
  14.     INCLUDE "exec/types.i"
  15.     ENDC
  16.  
  17.     IFND    GRAPHICS_GFX_I
  18.     INCLUDE    "graphics/gfx.i"
  19.     ENDC
  20.  
  21.     IFND    GRAPHICS_CLIP_I
  22.     INCLUDE    "graphics/clip.i"
  23.     ENDC
  24.  
  25.     IFND    GRAPHICS_VIEW_I
  26.     INCLUDE    "graphics/view.i"
  27.     ENDC
  28.  
  29.     IFND    GRAPHICS_RASTPORT_I
  30.     INCLUDE    "graphics/rastport.i"
  31.     ENDC
  32.  
  33.     IFND    GRAPHICS_LAYERS_I
  34.     INCLUDE    "graphics/layers.i"
  35.     ENDC
  36.  
  37.     IFND    GRAPHICS_TEXT_I
  38.     INCLUDE "graphics/text.i"
  39.     ENDC
  40.  
  41.     IFND EXEC_PORTS_I
  42.     INCLUDE "exec/ports.i"
  43.     ENDC
  44.  
  45.     IFND    DEVICES_TIMER_I
  46.     INCLUDE    "devices/timer.i"
  47.     ENDC
  48.  
  49.     IFND    DEVICES_INPUTEVENT_I
  50.     INCLUDE "devices/inputevent.i"
  51.     ENDC
  52.  
  53.     IFND UTILITY_TAGITEM_I
  54.     INCLUDE "utility/tagitem.i"
  55.     ENDC
  56.  
  57. *
  58. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  59. *
  60.  
  61.  
  62. ; ========================================================================;
  63. ; === Menu ===============================================================;
  64. ; ========================================================================;
  65.  STRUCTURE Menu,0
  66.  
  67.     APTR  mu_NextMenu    ; menu pointer, same level
  68.     WORD mu_LeftEdge    ; position of the select box
  69.     WORD mu_TopEdge    ; position of the select box
  70.     WORD mu_Width    ; dimensions of the select box
  71.     WORD mu_Height    ; dimensions of the select box
  72.     WORD mu_Flags    ; see flag definitions below
  73.     APTR mu_MenuName    ; text for this Menu Header
  74.     APTR  mu_FirstItem    ; pointer to first in chain
  75.  
  76.     ; these mysteriously-named variables are for internal use only
  77.     WORD mu_JazzX
  78.     WORD mu_JazzY
  79.     WORD mu_BeatX
  80.     WORD mu_BeatY
  81.  
  82.     LABEL mu_SIZEOF
  83.  
  84. ;*** FLAGS SET BY BOTH THE APPLIPROG AND INTUITION ***
  85. MENUENABLED EQU $0001    ; whether or not this menu is enabled
  86.  
  87. ;*** FLAGS SET BY INTUITION ***
  88. MIDRAWN EQU $0100    ; this menu's items are currently drawn
  89.  
  90. ; ========================================================================;
  91. ; === MenuItem ===========================================================;
  92. ; ========================================================================;
  93.  STRUCTURE MenuItem,0
  94.  
  95.     APTR mi_NextItem    ; pointer to next in chained list
  96.     WORD mi_LeftEdge    ; position of the select box
  97.     WORD mi_TopEdge    ; position of the select box
  98.     WORD mi_Width    ; dimensions of the select box
  99.     WORD mi_Height    ; dimensions of the select box
  100.     WORD mi_Flags    ; see the defines below
  101.  
  102.     LONG mi_MutualExclude ; set bits mean this item excludes that item
  103.  
  104.     APTR mi_ItemFill    ; points to Image, IntuiText, or NULL
  105.  
  106.     ; when this item is pointed to by the cursor and the items highlight
  107.     ; mode HIGHIMAGE is selected, this alternate image will be displayed
  108.     APTR mi_SelectFill    ; points to Image, IntuiText, or NULL
  109.  
  110.     BYTE mi_Command    ; only if appliprog sets the COMMSEQ flag
  111.  
  112.     BYTE mi_KludgeFill00 ; This is strictly for word-alignment
  113.  
  114.     APTR mi_SubItem    ; if non-zero, points to MenuItem for submenu
  115.  
  116.    ; The NextSelect field represents the menu number of next selected 
  117.    ; item (when user has drag-selected several items)
  118.     WORD mi_NextSelect
  119.  
  120.     LABEL  mi_SIZEOF
  121.  
  122. ; --- FLAGS SET BY THE APPLIPROG --------------------------------------------
  123. CHECKIT        EQU $0001    ; set to indicate checkmarkable item
  124. ITEMTEXT    EQU $0002    ; set if textual, clear if graphical item
  125. COMMSEQ        EQU $0004    ; set if there's an command sequence
  126. MENUTOGGLE    EQU $0008    ; set for toggling checks (else mut. exclude)
  127. ITEMENABLED    EQU $0010    ; set if this item is enabled
  128.  
  129. ; these are the SPECIAL HIGHLIGHT FLAG state meanings
  130. HIGHFLAGS    EQU $00C0    ; see definitions below for these bits
  131. HIGHIMAGE    EQU $0000    ; use the user's "select image"
  132. HIGHCOMP    EQU $0040    ; highlight by complementing the select box
  133. HIGHBOX        EQU $0080    ; highlight by drawing a box around the image
  134. HIGHNONE    EQU $00C0    ; don't highlight
  135.  
  136. ; --- FLAGS SET BY BOTH APPLIPROG AND INTUITION -----------------------------
  137. CHECKED    EQU $0100    ; state of the checkmark
  138.  
  139.  
  140. ; --- FLAGS SET BY INTUITION ------------------------------------------------
  141. ISDRAWN        EQU $1000    ; this item's subs are currently drawn
  142. HIGHITEM    EQU $2000    ; this item is currently highlighted
  143. MENUTOGGLED    EQU $4000    ; this item was already toggled 
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150. ; ========================================================================
  151. ; === Requester ==========================================================
  152. ; ========================================================================
  153.  STRUCTURE Requester,0
  154.  
  155.     APTR  rq_OlderRequest
  156.     WORD rq_LeftEdge        ; dimensions of the entire box
  157.     WORD rq_TopEdge        ; dimensions of the entire box
  158.     WORD rq_Width        ; dimensions of the entire box
  159.     WORD rq_Height        ; dimensions of the entire box
  160.  
  161.     WORD rq_RelLeft        ; get POINTREL Pointer relativity offsets
  162.     WORD rq_RelTop        ; get POINTREL Pointer relativity offsets
  163.  
  164.     APTR  rq_ReqGadget         ; pointer to the first of a list of gadgets
  165.     APTR  rq_ReqBorder        ; the box's border
  166.     APTR  rq_ReqText        ; the box's text
  167.  
  168.     WORD  rq_Flags        ; see definitions below
  169.  
  170.     UBYTE rq_BackFill        ; pen number for back-plane fill before draws
  171.  
  172.     BYTE rq_KludgeFill00    ; This is strictly for word-alignment
  173.  
  174.     APTR rq_ReqLayer        ; layer in which requester rendered
  175.     STRUCT rq_ReqPad1,32    ; for backwards compatibility (reserved)
  176.  
  177.     ; If the BitMap plane pointers are non-zero, this tells the system 
  178.     ; that the image comes pre-drawn (if the appliprog wants to define 
  179.     ; its own box, in any shape or size it wants!); this is OK by 
  180.     ; Intuition as long as there's a good correspondence between the image
  181.     ; and the specified Gadgets
  182.     APTR  rq_ImageBMap        ; points to the BitMap of PREDRAWN imagery
  183.  
  184.     APTR  rq_RWindow        ; points back to requester's window
  185.     APTR  rq_ReqImage        ; new for V36: drawn if USEREQIMAGE set
  186.     STRUCT rq_ReqPad2,32    ; for backwards compatibility (reserved)
  187.  
  188.     LABEL rq_SIZEOF
  189.  
  190. ; FLAGS SET BY THE APPLIPROG
  191. POINTREL    EQU $0001  ; if POINTREL set, TopLeft is relative to pointer
  192.                ; for DMRequester, relative to window center
  193.                ; for Request().
  194. PREDRAWN    EQU $0002  ; if ReqBMap points to predrawn Requester imagery
  195. NOISYREQ     EQU $0004  ; if you don't want requester to filter input
  196.  
  197. ; New for V36
  198. SIMPLEREQ    EQU $0010  ; to use SIMPLEREFRESH layer (recommended)
  199. USEREQIMAGE    EQU $0020  ; render linked list ReqImage after BackFill
  200.                ; but before gadgets and text
  201. NOREQBACKFILL    EQU $0040  ; don't bother filling with Requester.BackFill
  202.  
  203.  
  204. ; FLAGS SET BY INTUITION;
  205. REQOFFWINDOW    EQU $1000    ; part of one of the Gadgets was offwindow
  206. REQACTIVE    EQU $2000    ; this requester is active
  207. SYSREQUEST    EQU $4000    ; (unused) this requester caused by system
  208. DEFERREFRESH    EQU $8000    ; this Requester stops a Refresh broadcast
  209.  
  210.  
  211.  
  212.  
  213.  
  214. ; ========================================================================
  215. ; === Gadget =============================================================
  216. ; ========================================================================
  217.  STRUCTURE Gadget,0
  218.  
  219.     APTR gg_NextGadget        ; next gadget in the list
  220.  
  221.     WORD gg_LeftEdge        ; "hit box" of gadget
  222.     WORD gg_TopEdge        ; "hit box" of gadget
  223.     WORD gg_Width        ; "hit box" of gadget
  224.     WORD gg_Height        ; "hit box" of gadget
  225.  
  226.     WORD gg_Flags         ; see below for list of defines
  227.  
  228.     WORD gg_Activation        ; see below for list of defines
  229.  
  230.     WORD gg_GadgetType        ; see below for defines
  231.  
  232.     ; appliprog can specify that the Gadget be rendered as either as Border
  233.     ; or an Image.  This variable points to which (or equals NULL if there's
  234.     ; nothing to be rendered about this Gadget)
  235.     APTR gg_GadgetRender
  236.  
  237.     ; appliprog can specify "highlighted" imagery rather than algorithmic
  238.     ; this can point to either Border or Image data
  239.     APTR gg_SelectRender
  240.  
  241.     APTR gg_GadgetText        ; text for this gadget;
  242.  
  243.     ; MutualExclude, never implemented, is now declared obsolete.
  244.     ; There are published examples of implementing a more general
  245.     ; and practical exclusion in your applications.
  246.     ;
  247.     ; Starting V36, this field is used to point to a hook
  248.     ; for a custom gadget.
  249.     ;
  250.     ; Programs using this field for their own processing will
  251.     ; continue to work, as long as they don't try the
  252.     ; trick with custom gadgets
  253.     LONG gg_MutualExclude     ; obsolete
  254.  
  255.     ; pointer to a structure of special data required by Proportional, String 
  256.     ; and Integer Gadgets
  257.     APTR gg_SpecialInfo
  258.  
  259.     WORD gg_GadgetID    ; user-definable ID field
  260.     APTR  gg_UserData    ; ptr to general purpose User data (ignored by Intuit)
  261.  
  262.     LABEL gg_SIZEOF
  263.  
  264.  STRUCTURE ExtGadget,0
  265.  
  266.     ; The first fields match struct Gadget exactly
  267.     APTR egg_NextGadget        ; Matches struct Gadget
  268.     WORD egg_LeftEdge        ; Matches struct Gadget
  269.     WORD egg_TopEdge        ; Matches struct Gadget
  270.     WORD egg_Width        ; Matches struct Gadget
  271.     WORD egg_Height        ; Matches struct Gadget
  272.     WORD egg_Flags         ; Matches struct Gadget
  273.     WORD egg_Activation        ; Matches struct Gadget
  274.     WORD egg_GadgetType        ; Matches struct Gadget
  275.     APTR egg_GadgetRender    ; Matches struct Gadget
  276.     APTR egg_SelectRender    ; Matches struct Gadget
  277.     APTR egg_GadgetText        ; Matches struct Gadget
  278.     LONG egg_MutualExclude     ; Matches struct Gadget
  279.     APTR egg_SpecialInfo    ; Matches struct Gadget
  280.     WORD egg_GadgetID        ; Matches struct Gadget
  281.     APTR egg_UserData        ; Matches struct Gadget
  282.  
  283.     ; These fields only exist under V39 and only if GFLG_EXTENDED is set
  284.     ULONG egg_MoreFlags        ; see GMORE_ flags below
  285.     WORD egg_BoundsLeftEdge    ; Bounding extent for gadget, valid
  286.     WORD egg_BoundsTopEdge    ; only if GMORE_BOUNDS is set.  The
  287.     WORD egg_BoundsWidth    ; GFLG_RELxxx flags affect these
  288.     WORD egg_BoundsHeight    ; coordinates as well.
  289.  
  290.     LABEL egg_SIZEOF
  291.  
  292. ; --- Gadget.Flags values ---
  293. ; combinations in these bits describe the highlight technique to be used
  294. GFLG_GADGHIGHBITS    EQU $0003
  295. GFLG_GADGHCOMP        EQU $0000    ; Complement the select box
  296. GFLG_GADGHBOX        EQU $0001    ; Draw a box around the image
  297. GFLG_GADGHIMAGE        EQU $0002    ; Blast in this alternate image
  298. GFLG_GADGHNONE        EQU $0003    ; don't highlight
  299.  
  300. ; set this flag if the GadgetRender and SelectRender point to Image imagery,
  301. ; clear if it's a Border 
  302. GFLG_GADGIMAGE        EQU $0004
  303.  
  304. ; combinations in these next two bits specify to which corner the gadget's
  305. ; Left & Top coordinates are relative.    If relative to Top/Left,
  306. ; these are "normal" coordinates (everything is relative to something in
  307. ; this universe)
  308. GFLG_RELBOTTOM        EQU $0008    ; set if rel to bottom, clear if to top
  309. GFLG_RELRIGHT        EQU $0010    ; set if rel to right, clear if to left
  310. ; set the GFLG_RELWIDTH bit to spec that Width is relative to width of screen
  311. GFLG_RELWIDTH        EQU $0020
  312. ; set the GFLG_RELHEIGHT bit to spec that Height is rel to height of screen
  313. GFLG_RELHEIGHT        EQU $0040
  314.  
  315. ; New for V39: GFLG_RELSPECIAL allows custom gadget implementors to
  316. ; make gadgets whose position and size depend in an arbitrary way
  317. ; on their window's dimensions.  The GM_LAYOUT method will be invoked
  318. ; for such a gadget (or any other GREL_xxx gadget) at suitable times,
  319. ; such as when the window opens or the window's size changes.
  320. GFLG_RELSPECIAL        EQU $4000 ; custom gadget has special relativity.
  321.                   ; Gadget box values are absolutes, but
  322.                   ; can be changed via the GM_LAYOUT method.
  323.  
  324. ; the GFLG_SELECTED flag is initialized by you and set by Intuition.  It
  325. ; specifies whether or not this Gadget is currently selected/highlighted
  326. GFLG_SELECTED        EQU $0080
  327.  
  328.  
  329. ; the GFLG_DISABLED flag is initialized by you and later set by Intuition
  330. ; according to your calls to On/OffGadget().  It specifies whether or not
  331. ; this Gadget is currently disabled from being selected
  332. GFLG_DISABLED        EQU $0100
  333.  
  334. * These flags specify the type of text field that Gadget.GadgetText
  335. * points to.  In all normal (pre-V36) gadgets which you initialize
  336. * this field should always be zero.  Some types of gadget objects
  337. * created from classes will use these fields to keep track of
  338. * types of labels/contents that different from IntuiText, but are
  339. * stashed in GadgetText.
  340.  
  341. GFLG_LABELMASK        EQU    $3000
  342. GFLG_LABELITEXT        EQU    $0000    ; GadgetText points to IntuiText
  343. GFLG_LABELSTRING    EQU    $1000    ; GadgetText points to (UBYTE *)
  344. GFLG_LABELIMAGE        EQU    $2000    ; GadgetText points to Image (object)
  345. ; New for V37: GFLG_TABCYCLE
  346. GFLG_TABCYCLE        EQU    $0200    ; (string or custom) gadget
  347.                 ; participates in cycling activation with
  348.                 ; Tab or Shift-Tab
  349.  
  350. ; New for V37: GFLG_STRINGEXTEND.  We discovered that V34 doesn't properly
  351. ; ignore the value we had chosen for the Gadget->Activation flag
  352. ; GACT_STRINGEXTEND.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  353. ; The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  354. ; safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  355. ; (Note that the two flags are not numerically equal)
  356. GFLG_STRINGEXTEND    EQU    $0400  ; this String Gadget has StringExtend
  357.  
  358. ; New for V39: GFLG_IMAGEDISABLE.  This flag is automatically set if
  359. ; the custom image of this gadget knows how to do disabled rendering
  360. ; (more specifically, if its IA_SupportsDisable attribute is TRUE).
  361. ; Intuition uses this to defer the ghosting to the image-class,
  362. ; instead of doing it itself (the old compatible way).
  363. ; Do not set this flag yourself - Intuition will do it for you.
  364.  
  365. GFLG_IMAGEDISABLE     EQU    $0800  ; Gadget's image knows how to do disabled
  366.                        ; rendering
  367.  
  368. ; New for V39:    If set, this bit means that the Gadget is actually
  369. ; a struct ExtGadget, with new fields and flags.  All V39 boopsi
  370. ; gadgets are ExtGadgets.  Never ever attempt to read the extended
  371. ; fields of a gadget if this flag is not set.
  372.  
  373. GFLG_EXTENDED        EQU    $8000  ; Gadget is extended
  374.  
  375.  
  376.  
  377. ; --- These are the Activation flag bits ----------------------------------
  378. ; GACT_RELVERIFY is set if you want to verify that the pointer was still over
  379. ; the gadget when the select button was released.  Will cause
  380. ; an IDCMP_GADGETUP message to be sent if so.
  381. GACT_RELVERIFY        EQU $0001
  382.  
  383. ; the flag GACT_IMMEDIATE, when set, informs the caller that the gadget
  384. ; was activated when it was activated.    this flag works in conjunction with
  385. ; the GACT_RELVERIFY flag
  386. GACT_IMMEDIATE        EQU $0002
  387.  
  388. ; the flag GACT_ENDGADGET, when set, tells the system that this gadget, when
  389. ; selected, causes the Requester or AbsMessage to be ended.  Requesters or
  390. ; AbsMessages that are ended are erased and unlinked from the system
  391. GACT_ENDGADGET        EQU $0004
  392.  
  393. ; the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  394. ; reports on mouse movements while this gadget is active.
  395. ; You probably want to set the GACT_IMMEDIATE flag when using
  396. ; GACT_FOLLOWMOUSE, since that's the only reasonable way you have of learning
  397. ; why Intuition is suddenly sending you a stream of mouse movement events.
  398. ; If you don't set GACT_RELVERIFY, you'll get at least one Mouse Position
  399. ; event.
  400. ; Note: boolean FOLLOWMOUSE gadgets require GACT_RELVERIFY to get
  401. ; _any_ mouse movement events (this unusual behavior is a compatibility
  402. ; hold-over from the old days).
  403.  
  404. GACT_FOLLOWMOUSE    EQU $0008
  405.  
  406. ; if any of the BORDER flags are set in a Gadget that's included in the
  407. ; Gadget list when a Window is opened, the corresponding Border will
  408. ; be adjusted to make room for the Gadget
  409. GACT_RIGHTBORDER    EQU $0010
  410. GACT_LEFTBORDER        EQU $0020
  411. GACT_TOPBORDER        EQU $0040
  412. GACT_BOTTOMBORDER    EQU $0080
  413. GACT_BORDERSNIFF    EQU $8000    ; neither set nor rely on this bit
  414.  
  415. GACT_TOGGLESELECT    EQU $0100    ; this bit for toggle-select mode
  416. GACT_BOOLEXTEND        EQU $2000    ; This Boolean Gadget has a BoolInfo
  417.  
  418. ; should properly be in StringInfo, but aren't
  419. GACT_STRINGLEFT        EQU $0000    ; NOTE WELL: that this has value zero
  420. GACT_STRINGCENTER    EQU $0200    ; center the String
  421. GACT_STRINGRIGHT    EQU $0400    ; right-justify the String
  422. GACT_LONGINT        EQU $0800    ; This String Gadget is a Long Integer
  423. GACT_ALTKEYMAP        EQU $1000    ; has an alternate keymapping
  424. GACT_STRINGEXTEND    EQU $2000    ; this String Gadget has an extension
  425.                     ; NOTE: NEVER SET GACT_STRINGEXTEND
  426.                     ; IF YOU ARE RUNNING ON LESS THAN V36!
  427.                     ; SEE GFLG_STRINGEXTEND (ABOVE) INSTEAD
  428.  
  429. GACT_ACTIVEGADGET    EQU $4000    ; this gadget is "active".  This flag
  430.                 ; is maintained by Intuition, and you
  431.                 ; cannot count on its value persisting
  432.                 ; while you do something on your program's
  433.                 ; task.  It can only be trusted by
  434.                 ; people implementing custom gadgets
  435.  
  436. * note $8000 is used above (GACT_BORDERSNIFF); all Activation flags defined
  437.  
  438.  
  439.  
  440. ; --- GADGET TYPES -----------------------------------------------------------
  441. ; These are the Gaget Type definitions for the variable GadgetType.
  442. ; Gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  443. ; first comes the mask for Gadget flags reserved for Gadget typing
  444. GTYP_GADGETTYPE        EQU $FC00    ; all Gadget Global Type flags
  445.                     ; (padded)
  446. GTYP_SCRGADGET        EQU $4000    ; 1 = ScreenGadget, 0 = WindowGadget
  447. GTYP_GZZGADGET        EQU $2000    ; 1 = Gadget for WFLG_GIMMEZEROZERO
  448.                     ;     borders
  449. GTYP_REQGADGET        EQU $1000    ; 1 = this is a Requester Gadget
  450.  
  451. ; GTYP_SYSGADGET means that Intuition ALLOCATED the gadget.
  452. ; GTYP_SYSTYPEMASK is the mask you can apply to tell what type of
  453. ; system-gadget it is.    The possible types follow.
  454. GTYP_SYSGADGET        EQU $8000
  455. GTYP_SYSTYPEMASK    EQU $00F0
  456.  
  457. ; These definitions describe system gadgets in V36 and higher:
  458. GTYP_SIZING        EQU $0010        ; Window sizing gadget
  459. GTYP_WDRAGGING        EQU $0020        ; Window drag bar
  460. GTYP_SDRAGGING        EQU $0030        ; Screen drag bar
  461. GTYP_WDEPTH        EQU $0040        ; Window depth gadget
  462. GTYP_SDEPTH        EQU $0050        ; Screen depth gadget
  463. GTYP_WZOOM        EQU $0060        ; Window zoom gadget
  464. GTYP_SUNUSED        EQU $0070        ; Unused screen gadget
  465. GTYP_CLOSE        EQU $0080        ; Window close gadget
  466.  
  467. ; These definitions describe system gadgets prior to V36:
  468. GTYP_WUPFRONT        EQU GTYP_WDEPTH        ; Window to-front gadget
  469. GTYP_SUPFRONT        EQU GTYP_SDEPTH        ; Screen to-front gadget
  470. GTYP_WDOWNBACK        EQU GTYP_WZOOM        ; Window to-back gadget
  471. GTYP_SDOWNBACK        EQU GTYP_SUNUSED    ; Screen to-back gadget
  472.  
  473. ; GTYP_GTYPEMASK is a mask you can apply to tell what class
  474. ; of gadget this is.  The possible classes follow.
  475. GTYP_GTYPEMASK        EQU $0007
  476.  
  477. GTYP_BOOLGADGET        EQU $0001
  478. GTYP_GADGET0002        EQU $0002
  479. GTYP_PROPGADGET        EQU $0003
  480. GTYP_STRGADGET        EQU $0004
  481. GTYP_CUSTOMGADGET    EQU $0005
  482.  
  483. ; New for V39.    Gadgets which have the GFLG_EXTENDED flag set are
  484. ; actually ExtGadgets, which have more flags.  The GMORE_xxx
  485. ; identifiers describe those flags.  For GMORE_SCROLLRASTER, see
  486. ; important information in the ScrollWindowRaster() autodoc.
  487. ; NB: GMORE_SCROLLRASTER must be set before the gadget is
  488. ; added to a window.
  489.  
  490. GMORE_BOUNDS        EQU $00000001 ; ExtGadget has valid Bounds
  491. GMORE_GADGETHELP    EQU $00000002 ; This gadget responds to gadget help
  492. GMORE_SCROLLRASTER    EQU $00000004 ; This (custom) gadget uses ScrollRaster
  493.  
  494.  
  495.  
  496. ; ========================================================================
  497. ; === BoolInfo============================================================
  498. ; ========================================================================
  499. ; This is the special data needed by an Extended Boolean Gadget
  500. ; Typically this structure will be pointed to by the Gadget field SpecialInfo
  501.  
  502.  STRUCTURE BoolInfo,0
  503.  
  504.     WORD    bi_Flags    ; defined below
  505.     APTR    bi_Mask    ; bit mask for highlighting and selecting
  506.             ; mask must follow the same rules as an Image
  507.             ; plane.  Its width and height are determined
  508.             ; by the width and height of the gadget's 
  509.             ; select box. (i.e. Gadget.Width and .Height).
  510.     LONG    bi_Reserved    ; set to 0
  511.  
  512.     LABEL   bi_SIZEOF
  513.  
  514. ; set BoolInfo.Flags to this flag bit.
  515. ; in the future, additional bits might mean more stuff hanging
  516. ; off of BoolInfo.Reserved.
  517.  
  518. BOOLMASK    EQU    $0001    ; extension is for masked gadget
  519.  
  520. ; ========================================================================
  521. ; === PropInfo ===========================================================
  522. ; ========================================================================
  523. ; this is the special data required by the proportional Gadget
  524. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  525.  STRUCTURE PropInfo,0
  526.  
  527.     WORD pi_Flags    ; general purpose flag bits (see defines below)
  528.  
  529.     ; You initialize the Pot variables before the Gadget is added to 
  530.     ; the system.  Then you can look here for the current settings 
  531.     ; any time, even while User is playing with this Gadget.  To 
  532.     ; adjust these after the Gadget is added to the System, use 
  533.     ; ModifyProp(); The Pots are the actual proportional settings, 
  534.     ; where a value of zero means zero and a value of MAXPOT means 
  535.     ; that the Gadget is set to its maximum setting.
  536.     WORD pi_HorizPot    ; 16-bit FixedPoint horizontal quantity percentage;
  537.     WORD pi_VertPot    ; 16-bit FixedPoint vertical quantity percentage;
  538.  
  539.     ; the 16-bit FixedPoint Body variables describe what percentage 
  540.     ; of the entire body of stuff referred to by this Gadget is 
  541.     ; actually shown at one time.  This is used with the AUTOKNOB 
  542.     ; routines, to adjust the size of the AUTOKNOB according to how 
  543.     ; much of the data can be seen.  This is also used to decide how 
  544.     ; far to advance the Pots when User hits the Container of the Gadget.  
  545.     ; For instance, if you were controlling the display of a 5-line 
  546.     ; Window of text with this Gadget, and there was a total of 15 
  547.     ; lines that could be displayed, you would set the VertBody value to 
  548.     ;    (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  549.     ; Therefore, the AUTOKNOB would fill 1/3 of the container, and if 
  550.     ; User hits the Cotainer outside of the knob, the pot would advance 
  551.     ; 1/3 (plus or minus) If there's no body to show, or the total
  552.     ; amount of displayable info is less than the display area, set the
  553.     ; Body variables to the MAX.  To adjust these after the Gadget is
  554.     ; added to the System, use ModifyProp().
  555.     WORD pi_HorizBody    ; horizontal Body
  556.     WORD pi_VertBody    ; vertical Body
  557.  
  558.     ; these are the variables that Intuition sets and maintains
  559.     WORD pi_CWidth    ; Container width (with any relativity absoluted)
  560.     WORD pi_CHeight    ; Container height (with any relativity absoluted)
  561.     WORD pi_HPotRes    ; pot increments
  562.     WORD pi_VPotRes    ; pot increments
  563.     WORD pi_LeftBorder    ; Container borders
  564.     WORD pi_TopBorder    ; Container borders
  565.     LABEL  pi_SIZEOF
  566.  
  567. ; --- FLAG BITS --------------------------------------------------------------
  568. AUTOKNOB    EQU $0001    ; this flag sez:  gimme that old auto-knob
  569. FREEHORIZ    EQU $0002    ; if set, the knob can move horizontally
  570. FREEVERT    EQU $0004    ; if set, the knob can move vertically
  571. PROPBORDERLESS    EQU $0008    ; if set, no border will be rendered
  572. KNOBHIT        EQU $0100    ; set when this Knob is hit
  573. PROPNEWLOOK    EQU $0010    ; set this if you want to get the new
  574.                 ; V36 look
  575.  
  576. KNOBHMIN    EQU 6        ; minimum horizontal size of the knob
  577. KNOBVMIN    EQU 4        ; minimum vertical size of the knob
  578. MAXBODY        EQU $FFFF    ; maximum body value
  579. MAXPOT            EQU $FFFF    ; maximum pot value
  580.  
  581.  
  582. ; ========================================================================
  583. ; === StringInfo =========================================================
  584. ; ========================================================================
  585. ; this is the special data required by the string Gadget
  586. ; typically, this data will be pointed to by the Gadget variable SpecialInfo
  587.  STRUCTURE StringInfo,0
  588.  
  589.     ; you initialize these variables, and then Intuition maintains them
  590.     APTR  si_Buffer    ; the buffer containing the start and final string
  591.     APTR  si_UndoBuffer    ; optional buffer for undoing current entry
  592.     WORD si_BufferPos    ; character position in Buffer
  593.     WORD si_MaxChars    ; max number of chars in Buffer (including NULL)
  594.     WORD si_DispPos    ; Buffer position of first displayed character
  595.  
  596.     ; Intuition initializes and maintains these variables for you
  597.     WORD si_UndoPos    ; character position in the undo buffer
  598.     WORD si_NumChars    ; number of characters currently in Buffer
  599.     WORD si_DispCount    ; number of whole characters visible in Container
  600.     WORD si_CLeft    ; topleft offset of the container
  601.     WORD si_CTop    ; topleft offset of the container
  602.  
  603.     ; unused field is changed to allow extended specification
  604.     ; of string gadget parameters.  It is ignored unless the flag
  605.     ; GACT_STRINGEXTEND is set in the Gadget's Activation field
  606.     ; or the GFLG_STRINGEXTEND flag is set in the Gadget Flags field.
  607.     ; (See GFLG_STRINGEXTEND for an important note)
  608.     ;APTR  si_LayerPtr    ; --- obsolete ---
  609.     APTR  si_Extension
  610.  
  611.     ; you can initialize this variable before the gadget is submitted to
  612.     ; Intuition, and then examine it later to discover what integer 
  613.     ; the user has entered (if the user never plays with the gadget, 
  614.     ; the value will be unchanged from your initial setting)
  615.     LONG  si_LongInt    ; the LONG return value of a GACT_LONGINT String Gad.
  616.  
  617.     ; If you want this Gadget to use your own Console keymapping, you
  618.     ; set the GACT_ALTKEYMAP bit in the Activation flags of the Gadget, and
  619.     ; then set this variable to point to your keymap.  If you don't set the
  620.     ; GACT_ALTKEYMAP, you'll get the standard ASCII keymapping.
  621.     APTR si_AltKeyMap
  622.  
  623.     LABEL si_SIZEOF
  624.  
  625.  
  626.  
  627.  
  628. ; ========================================================================
  629. ; === IntuiText ==========================================================
  630. ; ========================================================================
  631. ; IntuiText is a series of strings that start with a location
  632. ; (always relative to the upper-left corner of something) and then the
  633. ; text of the string.  The text is null-terminated.
  634.  STRUCTURE IntuiText,0
  635.  
  636.     BYTE it_FrontPen        ; the pens for rendering the text
  637.     BYTE it_BackPen        ; the pens for rendering the text
  638.  
  639.     BYTE it_DrawMode        ; the mode for rendering the text
  640.  
  641.     BYTE it_KludgeFill00     ; This is strictly for word-alignment 
  642.  
  643.     WORD it_LeftEdge        ; relative start location for the text
  644.     WORD it_TopEdge        ; relative start location for the text
  645.  
  646.     APTR  it_ITextFont        ; if NULL, you accept the defaults
  647.  
  648.     APTR it_IText        ; pointer to null-terminated text
  649.  
  650.     APTR  it_NextText        ; pointer to another IntuiText to render
  651.  
  652.     LABEL it_SIZEOF
  653.  
  654.  
  655.  
  656.  
  657.  
  658. ; ========================================================================
  659. ; === Border =============================================================
  660. ; ========================================================================
  661. ; Data type Border, used for drawing a series of lines which is intended for
  662. ; use as a border drawing, but which may, in fact, be used to render any
  663. ; arbitrary vector shape.
  664. ; The routine DrawBorder sets up the RastPort with the appropriate
  665. ; variables, then does a Move to the first coordinate, then does Draws
  666. ; to the subsequent coordinates.
  667. ; After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  668. ; on NextBorder
  669.  STRUCTURE Border,0
  670.  
  671.     WORD  bd_LeftEdge        ; initial offsets from the origin
  672.     WORD  bd_TopEdge        ; initial offsets from the origin
  673.     BYTE  bd_FrontPen        ; pen number for rendering 
  674.     BYTE  bd_BackPen        ; pen number for rendering 
  675.     BYTE  bd_DrawMode        ; mode for rendering 
  676.     BYTE  bd_Count        ; number of XY pairs
  677.     APTR  bd_XY            ; vector coordinate pairs rel to LeftTop
  678.     APTR  bd_NextBorder        ; pointer to any other Border too
  679.  
  680.     LABEL bd_SIZEOF
  681.  
  682.  
  683. ; ======================================================================== 
  684. ; === Image ============================================================== 
  685. ; ======================================================================== 
  686. ; This is a brief image structure for very simple transfers of 
  687. ; image data to a RastPort
  688.  STRUCTURE Image,0
  689.  
  690.     WORD ig_LeftEdge        ; starting offset relative to something 
  691.     WORD ig_TopEdge        ; starting offset relative to something 
  692.     WORD ig_Width        ; pixel size (though data is word-aligned)
  693.     WORD ig_Height        ; pixel size 
  694.     WORD ig_Depth        ; pixel size 
  695.     APTR ig_ImageData        ; pointer to the actual image bits
  696.  
  697.     ; the PlanePick and PlaneOnOff variables work much the same way as the
  698.     ; equivalent GELS Bob variables.  It's a space-saving
  699.     ; mechanism for image data.  Rather than defining the image data
  700.     ; for every plane of the RastPort, you need define data only for planes
  701.     ; that are not entirely zero or one.  As you define your Imagery, you will
  702.     ; often find that most of the planes ARE just as color selectors.  For
  703.     ; instance, if you're designing a two-color Gadget to use colors two and
  704.     ; three, and the Gadget will reside in a five-plane display, plane zero
  705.     ; of your imagery would be all ones, bit plane one would have data that
  706.     ; describes the imagery, and bit planes two through four would be
  707.     ; all zeroes.  Using these flags allows you to avoid wasting all that 
  708.     ; memory in this way:  
  709.     ; first, you specify which planes you want your data to appear 
  710.     ; in using the PlanePick variable.  For each bit set in the variable, the 
  711.     ; next "plane" of your image data is blitted to the display.  For each bit
  712.     ; clear in this variable, the corresponding bit in PlaneOnOff is examined.
  713.     ; If that bit is clear, a "plane" of zeroes will be used.  If the bit is 
  714.     ; set, ones will go out instead.  So, for our example:
  715.     ;   Gadget.PlanePick = 0x02;
  716.     ;   Gadget.PlaneOnOff = 0x01;
  717.     ; Note that this also allows for generic Gadgets, like the System Gadgets,
  718.     ; which will work in any number of bit planes
  719.     ; Note also that if you want an Image that is only a filled rectangle,
  720.     ; you can get this by setting PlanePick to zero (pick no planes of data)
  721.     ; and set PlaneOnOff to describe the pen color of the rectangle.
  722.     ;
  723.     ; NOTE:  Intuition relies on PlanePick to know how many planes
  724.     ; of data are found in ImageData.  There should be no more
  725.     ; '1'-bits in PlanePick than there are planes in ImageData.
  726.     BYTE ig_PlanePick
  727.     BYTE ig_PlaneOnOff
  728.  
  729.     ; if the NextImage variable is not NULL, Intuition presumes that 
  730.     ; it points to another Image structure with another Image to be 
  731.     ; rendered
  732.     APTR ig_NextImage
  733.  
  734.  
  735.     LABEL ig_SIZEOF
  736.  
  737.  
  738.  
  739.  
  740. ; ======================================================================== 
  741. ; === IntuiMessage ======================================================= 
  742. ; ======================================================================== 
  743.  STRUCTURE IntuiMessage,0
  744.  
  745.     STRUCT im_ExecMessage,MN_SIZE
  746.  
  747.     ; the Class bits correspond directly with the IDCMP Flags, except for the
  748.     ; special bit IDCMP_LONELYMESSAGE (defined below)
  749.     LONG im_Class
  750.  
  751.     ; the Code field is for special values like MENU number 
  752.     WORD im_Code
  753.  
  754.     ; the Qualifier field is a copy of the current InputEvent's Qualifier
  755.     WORD im_Qualifier
  756.  
  757.     ; IAddress contains particular addresses for Intuition functions, like
  758.     ; the pointer to the Gadget or the Screen
  759.     APTR im_IAddress
  760.  
  761.     ; when getting mouse movement reports, any event you get will have the
  762.     ; the mouse coordinates in these variables.  the coordinates are relative
  763.     ; to the upper-left corner of your Window (WFLG_GIMMEZEROZERO
  764.     ; notwithstanding)
  765.     ; If the DELTAMOVE IDCMP flag is set, these values will be deltas from
  766.     ; the last reported position.
  767.     WORD im_MouseX
  768.     WORD im_MouseY
  769.  
  770.     ; the time values are copies of the current system clock time.  Micros
  771.     ; are in units of microseconds, Seconds in seconds.
  772.     LONG im_Seconds
  773.     LONG im_Micros
  774.  
  775.     ; the IDCMPWindow variable will always have the address of the Window of
  776.     ; this IDCMP
  777.     APTR im_IDCMPWindow
  778.  
  779.     ; system-use variable
  780.     APTR im_SpecialLink
  781.  
  782.     LABEL  im_SIZEOF
  783.  
  784. * New for V39:
  785. * All IntuiMessages are now slightly extended.    The ExtIntuiMessage
  786. * structure has an additional field for tablet data, which is usually
  787. * NULL.  If a tablet driver which is sending IESUBCLASS_NEWTABLET
  788. * events is installed in the system, windows with the WA_TabletMessages
  789. * property set will find that eim_TabletData points to the TabletData
  790. * structure.  Applications must first check that this field is non-NULL;
  791. * it will be NULL for certain kinds of message, including mouse activity
  792. * generated from other than the tablet (i.e. the keyboard equivalents
  793. * or the mouse itself).
  794. *
  795. * NEVER EVER examine any extended fields when running under pre-V39!
  796. *
  797. * NOTE: This structure is subject to grow in the future.  Making
  798. * assumptions about its size is A BAD IDEA.
  799.  
  800.  STRUCTURE ExtIntuiMessage,0
  801.  
  802.     STRUCT eim_IntuiMessage,im_SIZEOF
  803.     APTR eim_TabletData
  804.  
  805.  
  806. ; --- IDCMP Classes ------------------------------------------------------
  807. ; Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  808. ; Manual for full details on the IDCMP classes.
  809.  
  810. IDCMP_SIZEVERIFY    EQU    $00000001
  811. IDCMP_NEWSIZE        EQU    $00000002
  812. IDCMP_REFRESHWINDOW    EQU    $00000004
  813. IDCMP_MOUSEBUTTONS    EQU    $00000008
  814. IDCMP_MOUSEMOVE        EQU    $00000010
  815. IDCMP_GADGETDOWN    EQU    $00000020
  816. IDCMP_GADGETUP        EQU    $00000040
  817. IDCMP_REQSET        EQU    $00000080
  818. IDCMP_MENUPICK        EQU    $00000100
  819. IDCMP_CLOSEWINDOW    EQU    $00000200
  820. IDCMP_RAWKEY        EQU    $00000400
  821. IDCMP_REQVERIFY        EQU    $00000800
  822. IDCMP_REQCLEAR        EQU    $00001000
  823. IDCMP_MENUVERIFY    EQU    $00002000
  824. IDCMP_NEWPREFS        EQU    $00004000
  825. IDCMP_DISKINSERTED    EQU    $00008000
  826. IDCMP_DISKREMOVED    EQU    $00010000
  827. IDCMP_WBENCHMESSAGE    EQU    $00020000    ; System use only
  828. IDCMP_ACTIVEWINDOW    EQU    $00040000
  829. IDCMP_INACTIVEWINDOW    EQU    $00080000
  830. IDCMP_DELTAMOVE        EQU    $00100000
  831. IDCMP_VANILLAKEY    EQU    $00200000
  832. IDCMP_INTUITICKS    EQU    $00400000
  833. ;  for notifications from "boopsi" gadgets:
  834. IDCMP_IDCMPUPDATE    EQU    $00800000    ; new for V36
  835. ; for getting help key report during menu session:
  836. IDCMP_MENUHELP        EQU    $01000000    ; new for V36
  837. ; for notification of any move/size/zoom/change window:
  838. IDCMP_CHANGEWINDOW    EQU    $02000000    ; new for V36
  839. IDCMP_GADGETHELP    EQU    $04000000    ; new for V39
  840.  
  841. ; NOTEZ-BIEN:        $80000000 is reserved for internal use by IDCMP
  842.  
  843. ; the IDCMP Flags do not use this special bit, which is cleared when
  844. ; Intuition sends its special message to the Task, and set when Intuition
  845. ; gets its Message back from the Task.    Therefore, I can check here to
  846. ; find out fast whether or not this Message is available for me to send
  847. IDCMP_LONELYMESSAGE    EQU    $80000000
  848.  
  849.  
  850.  
  851. ; --- IDCMP Codes --------------------------------------------------------
  852. ; This group of codes is for the IDCMP_CHANGEWINDOW message
  853. CWCODE_MOVESIZE    EQU    $0000    ; Window was moved and/or sized
  854. CWCODE_DEPTH    EQU    $0001    ; Window was depth-arranged (new for V39)
  855.  
  856. ; This group of codes is for the IDCMP_MENUVERIFY message
  857. MENUHOT        EQU    $0001    ; IntuiWants verification or MENUCANCEL
  858. MENUCANCEL    EQU    $0002    ; HOT Reply of this cancels Menu operation
  859. MENUWAITING    EQU    $0003    ; Intuition simply wants a ReplyMsg() ASAP
  860.  
  861. ; These are internal tokens to represent state of verification attempts
  862. ; shown here as a clue.
  863. OKOK        EQU    MENUHOT        ; guy didn't care
  864. OKABORT        EQU    $0004        ; window rendered question moot
  865. OKCANCEL     EQU    MENUCANCEL     ; window sent cancel reply
  866.  
  867. ; This group of codes is for the IDCMP_WBENCHMESSAGE messages
  868. WBENCHOPEN    EQU $0001
  869. WBENCHCLOSE    EQU $0002
  870.  
  871. ; A data structure common in V36 Intuition processing
  872.  
  873.  STRUCTURE    IBox,0
  874.     WORD    ibox_Left
  875.     WORD    ibox_Top
  876.     WORD    ibox_Width
  877.     WORD    ibox_Height
  878.  LABEL    ibox_SIZEOF
  879.  
  880.  
  881. ; ======================================================================== 
  882. ; === Window ============================================================= 
  883. ; ======================================================================== 
  884.  STRUCTURE Window,0
  885.  
  886.     APTR wd_NextWindow        ; for the linked list of a Screen
  887.  
  888.     WORD wd_LeftEdge        ; screen dimensions
  889.     WORD wd_TopEdge        ; screen dimensions
  890.     WORD wd_Width        ; screen dimensions
  891.     WORD wd_Height        ; screen dimensions
  892.  
  893.     WORD wd_MouseY        ; relative top top-left corner 
  894.     WORD wd_MouseX        ; relative top top-left corner 
  895.  
  896.     WORD wd_MinWidth        ; minimum sizes
  897.     WORD wd_MinHeight        ; minimum sizes
  898.     WORD wd_MaxWidth        ; maximum sizes
  899.     WORD wd_MaxHeight        ; maximum sizes
  900.  
  901.     LONG wd_Flags        ; see below for definitions
  902.  
  903.     APTR wd_MenuStrip        ; first in a list of menu headers
  904.  
  905.     APTR wd_Title        ; title text for the Window
  906.  
  907.     APTR wd_FirstRequest    ; first in linked list of active Requesters 
  908.     APTR wd_DMRequest        ; the double-menu Requester 
  909.     WORD wd_ReqCount        ; number of Requesters blocking this Window
  910.     APTR wd_WScreen        ; this Window's Screen
  911.     APTR wd_RPort        ; this Window's very own RastPort
  912.  
  913.     ; the border variables describe the window border.  If you specify
  914.     ; WFLG_GIMMEZEROZERO when you open the window, then the upper-left of the
  915.     ; ClipRect for this window will be upper-left of the BitMap (with correct
  916.     ; offsets when in SuperBitMap mode; you MUST select WFLG_GIMMEZEROZERO
  917.     ; when using SuperBitMap).  If you don't specify ZeroZero, then you save
  918.     ; memory (no allocation of RastPort, Layer, ClipRect and associated
  919.     ; Bitmaps), but you also must offset all your writes by BorderTop,
  920.     ; BorderLeft and do your own mini-clipping to prevent writing over the
  921.     ; system gadgets
  922.     BYTE wd_BorderLeft
  923.     BYTE wd_BorderTop
  924.     BYTE wd_BorderRight
  925.     BYTE wd_BorderBottom
  926.     APTR wd_BorderRPort
  927.  
  928.     ; You supply a linked-list of gadget that you want for your Window.
  929.     ; This list DOES NOT include system Gadgets.  You get the standard
  930.     ; window system Gadgets by setting flag-bits in the variable Flags (see
  931.     ; the bit definitions below)
  932.     APTR wd_FirstGadget
  933.  
  934.     ; these are for opening/closing the windows
  935.     APTR wd_Parent
  936.     APTR wd_Descendant
  937.  
  938.     ; sprite data information for your own Pointer
  939.     ; set these AFTER you Open the Window by calling SetPointer()
  940.     APTR wd_Pointer
  941.     BYTE wd_PtrHeight
  942.     BYTE wd_PtrWidth
  943.     BYTE wd_XOffset
  944.     BYTE wd_YOffset
  945.  
  946.     ; the IDCMP Flags and User's and Intuition's Message Ports
  947.     ULONG wd_IDCMPFlags
  948.     APTR wd_UserPort
  949.     APTR wd_WindowPort
  950.     APTR wd_MessageKey
  951.  
  952.     BYTE wd_DetailPen
  953.     BYTE wd_BlockPen
  954.  
  955.     ; the CheckMark is a pointer to the imagery that will be used when
  956.     ; rendering MenuItems of this Window that want to be checkmarked
  957.     ; if this is equal to NULL, you'll get the default imagery
  958.     APTR wd_CheckMark
  959.  
  960.     ; if non-null, Screen title when Window is active 
  961.     APTR wd_ScreenTitle
  962.  
  963.     ; These variables have the mouse coordinates relative to the 
  964.     ; inner-Window of WFLG_GIMMEZEROZERO Windows.  This is compared with the
  965.     ; MouseX and MouseY variables, which contain the mouse coordinates
  966.     ; relative to the upper-left corner of the Window, WFLG_GIMMEZEROZERO
  967.     ; notwithstanding
  968.     WORD wd_GZZMouseX
  969.     WORD wd_GZZMouseY
  970.     ; these variables contain the width and height of the inner-Window of
  971.     ; WFLG_GIMMEZEROZERO Windows
  972.     WORD wd_GZZWidth
  973.     WORD wd_GZZHeight
  974.  
  975.     APTR wd_ExtData
  976.  
  977.     ; general-purpose pointer to User data extension 
  978.     APTR wd_UserData
  979.     APTR wd_WLayer    ; stash of Window.RPort->Layer
  980.  
  981.     ; NEW 1.2: need to keep track of the font that OpenWindow opened,
  982.     ; in case user SetFont's into RastPort
  983.     APTR  wd_IFont
  984.  
  985.     ; (V36) another flag word (the Flags field is used up).
  986.     ; At present, all flag values are system private.
  987.     ; Until further notice, you may not change nor use this field.
  988.     ULONG wd_MoreFlags
  989.  
  990.     ; ----- subsequent fields are INTUITION PRIVATE ---
  991.  
  992.     LABEL wd_Size
  993.     LABEL wd_SIZEOF    ; you should never use this: only Intuition allocates
  994.  
  995. ; --- Flags requested at OpenWindow() time by the application -------------
  996. WFLG_SIZEGADGET    EQU $0001    ; include sizing system-gadget?
  997. WFLG_DRAGBAR        EQU $0002    ; include dragging system-gadget?
  998. WFLG_DEPTHGADGET    EQU $0004    ; include depth arrangement gadget?
  999. WFLG_CLOSEGADGET    EQU $0008    ; include close-box system-gadget?
  1000.  
  1001. WFLG_SIZEBRIGHT        EQU $0010    ; size gadget uses right border
  1002. WFLG_SIZEBBOTTOM    EQU $0020    ; size gadget uses bottom border
  1003.  
  1004. ; --- refresh modes ----------------------------------------------------------
  1005. ; combinations of the WFLG_REFRESHBITS select the refresh type
  1006. WFLG_REFRESHBITS    EQU $00C0
  1007. WFLG_SMART_REFRESH    EQU $0000
  1008. WFLG_SIMPLE_REFRESH    EQU $0040
  1009. WFLG_SUPER_BITMAP    EQU $0080
  1010. WFLG_OTHER_REFRESH    EQU $00C0
  1011.  
  1012. WFLG_BACKDROP        EQU $0100    ; this is a backdrop window
  1013.  
  1014. WFLG_REPORTMOUSE    EQU $0200    ; set this to hear every mouse move
  1015.  
  1016. WFLG_GIMMEZEROZERO    EQU $0400    ; make extra border stuff
  1017.  
  1018. WFLG_BORDERLESS        EQU $0800    ; set this to get a Window sans border
  1019.  
  1020. WFLG_ACTIVATE        EQU $1000    ; when Window opens, it's the Active
  1021.                     ; one 
  1022.  
  1023. ; --- Other User Flags -------------------------------------------------------
  1024. WFLG_RMBTRAP        EQU $00010000    ; Catch RMB events for your own 
  1025. WFLG_NOCAREREFRESH    EQU $00020000    ; not to be bothered with REFRESH
  1026.  
  1027. ; - V36 new Flags which the programmer may specify in NewScreen.Flags 
  1028. WFLG_NW_EXTENDED    EQU $00040000    ; extension data provided
  1029.                     ; see ExtNewWindow structure
  1030. ; - V39 new Flags which the programmer may specify in NewScreen.Flags 
  1031. WFLG_NEWLOOKMENUS    EQU $00200000    ; window has NewLook menus
  1032.  
  1033.  
  1034. ; These flags are set only by Intuition.  YOU MAY NOT SET THEM YOURSELF!
  1035. WFLG_WINDOWACTIVE    EQU $2000    ; this window is the active one 
  1036. WFLG_INREQUEST        EQU $4000    ; this window is in request mode 
  1037. WFLG_MENUSTATE        EQU $8000    ; this Window is active with its
  1038.                     ; Menus on 
  1039. WFLG_WINDOWREFRESH    EQU $01000000    ; Window is currently refreshing
  1040. WFLG_WBENCHWINDOW    EQU $02000000    ; WorkBench Window
  1041. WFLG_WINDOWTICKED    EQU $04000000    ; only one timer tick at a time
  1042.  
  1043. ; V36 and higher flags to be set only by Intuition:
  1044. WFLG_VISITOR        EQU $08000000    ; visitor window (see autodoc for OpenWindow)
  1045. WFLG_ZOOMED        EQU $10000000    ; identifies "zoom state"
  1046. WFLG_HASZOOM        EQU $20000000    ; window has a zoom gadget
  1047.  
  1048.  
  1049. SUPER_UNUSED    EQU $FCFC0000    ; OBSOLETE (was bits of Flag unused yet)
  1050.  
  1051.  
  1052. ; --- Other Window Values ---------------------------------------------- 
  1053. DEFAULTMOUSEQUEUE    EQU 5     ; no more mouse messages
  1054.  
  1055.  
  1056. ; --- see struct IntuiMessage for the IDCMP Flag definitions -----------------
  1057.  
  1058.  
  1059. ; ======================================================================== 
  1060. ; === NewWindow ========================================================== 
  1061. ; ======================================================================== 
  1062. ; NOTE: to use the new features of V36, you may need to use the
  1063. ; ExtNewWindow structure, below.
  1064.  STRUCTURE NewWindow,0
  1065.  
  1066.     WORD nw_LeftEdge        ; initial Window dimensions
  1067.     WORD nw_TopEdge        ; initial Window dimensions
  1068.     WORD nw_Width        ; initial Window dimensions
  1069.     WORD nw_Height        ; initial Window dimensions
  1070.  
  1071.     BYTE nw_DetailPen        ; for rendering the detail bits of the Window
  1072.     BYTE nw_BlockPen        ; for rendering the block-fill bits 
  1073.  
  1074.     LONG nw_IDCMPFlags        ; initial IDCMP state
  1075.  
  1076.     LONG nw_Flags        ; see the Flag definition under Window
  1077.  
  1078.     ; You supply a linked-list of Gadgets for your Window.
  1079.     ; This list DOES NOT include system Gadgets.  You get the standard
  1080.     ; system Window Gadgets by setting flag-bits in the variable Flags (see
  1081.     ; the bit definitions under the Window structure definition)
  1082.     APTR    nw_FirstGadget
  1083.  
  1084.     ; the CheckMark is a pointer to the imagery that will be used when 
  1085.     ; rendering MenuItems of this Window that want to be checkmarked
  1086.     ; if this is equal to NULL, you'll get the default imagery
  1087.     APTR nw_CheckMark
  1088.  
  1089.     APTR nw_Title        ; title text for the Window
  1090.  
  1091.     ; the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1092.     ; want this Window to open in it.  If so, you pass the address of the
  1093.     ; Custom Screen structure in this variable.  Otherwise, this variable
  1094.     ; is ignored and doesn't have to be initialized.
  1095.     APTR nw_Screen
  1096.  
  1097.     ; WFLG_SUPER_BITMAP Window?  If so, put the address of your BitMap
  1098.     ; structure in this variable.  If not, this variable is ignored and
  1099.     ; doesn't have to be initialized
  1100.     APTR nw_BitMap
  1101.  
  1102.     ; the values describe the minimum and maximum sizes of your Windows.
  1103.     ; these matter only if you've chosen the WFLG_SIZEGADGET Gadget option,
  1104.     ; which means that you want to let the User to change the size of
  1105.     ; this Window.  You describe the minimum and maximum sizes that the
  1106.     ; Window can grow by setting these variables.  You can initialize
  1107.     ; any one these to zero, which will mean that you want to duplicate
  1108.     ; the setting for that dimension (if MinWidth == 0, MinWidth will be
  1109.     ; set to the opening Width of the Window).
  1110.     ; You can change these settings later using SetWindowLimits().
  1111.     ; If you haven't asked for a GTYP_SIZING Gadget, you don't have to
  1112.     ; initialize any of these variables.
  1113.     WORD nw_MinWidth
  1114.     WORD nw_MinHeight
  1115.     WORD nw_MaxWidth
  1116.     WORD nw_MaxHeight
  1117.  
  1118.     ; the type variable describes the Screen in which you want this Window to
  1119.     ; open.  The type value can either be CUSTOMSCREEN or one of the
  1120.     ; system standard Screen Types such as WBENCHSCREEN.  See the
  1121.     ; type definitions under the Screen structure
  1122.     ; A new possible value for this field is PUBLICSCREEN, which
  1123.     ; defines the window as a 'visitor' window.  See below for
  1124.     ; additional information provided.
  1125.     WORD nw_Type
  1126.  
  1127.     LABEL nw_SIZE
  1128.     LABEL nw_SIZEOF
  1129.  
  1130. ; ExtNewWindow -- NewWindow plus extension fields.
  1131. ; This structure may be extended again, so programs depending on its
  1132. ; size are incorrect.
  1133.  
  1134.  STRUCTURE ExtNewWindow,nw_SIZE
  1135.  
  1136.     ; extensions for V36
  1137.     ; if the NewWindow Flag WFLG_NW_EXTENDED is set, then
  1138.     ; this field is assumed to point to an array (or chain of arrays)
  1139.     ; of TagItem structures.  See also ExtNewScreen for another
  1140.     ; use of TagItems to pass optional data.
  1141.     ;
  1142.     ; see below for tag values and the corresponding data
  1143.  
  1144.     APTR    enw_Extension    ; pointer to TagItem array
  1145.     LABEL enw_SIZEOF
  1146.  
  1147. * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1148. * They are values in a TagItem array passed as extension/replacement
  1149. * values for the data in NewWindow.  OpenWindowTagList() can actually
  1150. * work well with a NULL NewWindow pointer.
  1151.  
  1152.     ENUM TAG_USER+100
  1153.  
  1154.     ; these tags simply override NewWindow parameters
  1155.     EITEM WA_Left
  1156.     EITEM WA_Top
  1157.     EITEM WA_Width
  1158.     EITEM WA_Height
  1159.     EITEM WA_DetailPen
  1160.     EITEM WA_BlockPen
  1161.     EITEM WA_IDCMP
  1162.     EITEM WA_Flags    ; not implemented at present
  1163.     EITEM WA_Gadgets
  1164.     EITEM WA_Checkmark
  1165.     EITEM WA_Title
  1166.     EITEM WA_ScreenTitle    ; means you don't have to call SetWindowTitles
  1167.                 ; after you open your window
  1168.  
  1169.     EITEM WA_CustomScreen
  1170.     EITEM WA_SuperBitMap    ; also implies WFLG_SUPER_BITMAP property
  1171.     EITEM WA_MinWidth
  1172.     EITEM WA_MinHeight
  1173.     EITEM WA_MaxWidth
  1174.     EITEM WA_MaxHeight
  1175.  
  1176.     ; The following are specifications for new features
  1177.  
  1178.     EITEM WA_InnerWidth
  1179.     EITEM WA_InnerHeight ; You can specify the dimensions of the interior
  1180.              ; region of your window, independent of what
  1181.              ; the border widths will be.  You probably want
  1182.              ; to also specify WA_AutoAdjust to allow
  1183.              ; Intuition to move your window or even
  1184.              ; shrink it so that it is completely on screen.
  1185.  
  1186.     EITEM WA_PubScreenName    ; declares that you want the window to open as
  1187.              ; a visitor on the public screen whose name is
  1188.              ; pointed to by (UBYTE *) ti_Data
  1189.  
  1190.     EITEM WA_PubScreen    ; open as a visitor window on the public screen
  1191.             ; whose address is in (struct Screen *) ti_Data.
  1192.             ; To ensure that this screen remains open, you
  1193.             ; should either be the screen's owner, have a
  1194.             ; window open on the screen, or use LockPubScreen().
  1195.  
  1196.     EITEM WA_PubScreenFallBack    ; A Boolean, specifies whether a visitor window
  1197.              ; should "fall back" to the default public screen
  1198.              ; (or Workbench) if the named public screen isn't
  1199.              ; available
  1200.  
  1201.     EITEM WA_WindowName    ; not implemented
  1202.     EITEM WA_Colors    ; a ColorSpec array for colors to be set
  1203.             ; when this window is active.  This is not
  1204.             ; implemented, and may not be, since the default
  1205.             ; values to restore would be hard to track.
  1206.             ; We'd like to at least support per-window colors
  1207.             ; for the mouse pointer sprite.
  1208.  
  1209.     EITEM WA_Zoom    ; ti_Data points to an array of four WORD's,
  1210.             ; the initial Left/Top/Width/Height values of
  1211.             ; the "alternate" zoom position/dimensions.
  1212.             ; It also specifies that you want a Zoom gadget
  1213.             ; for your window, whether or not you have a
  1214.             ; sizing gadget.
  1215.  
  1216.     EITEM WA_MouseQueue    ; ti_Data contains initial value for the mouse
  1217.             ; message backlog limit for this window.
  1218.  
  1219.     EITEM WA_BackFill    ; provides a "backfill hook" for your window's Layer.
  1220.             ; See layers.library/CreateUpfrontHookLayer().
  1221.  
  1222.     EITEM WA_RptQueue    ; initial value of repeat key backlog limit
  1223.  
  1224.     ; These Boolean tag items are alternatives to the NewWindow.Flags
  1225.     ; boolean flags with similar names.
  1226.  
  1227.     EITEM WA_SizeGadget
  1228.     EITEM WA_DragBar
  1229.     EITEM WA_DepthGadget
  1230.     EITEM WA_CloseGadget
  1231.     EITEM WA_Backdrop
  1232.     EITEM WA_ReportMouse
  1233.     EITEM WA_NoCareRefresh
  1234.     EITEM WA_Borderless
  1235.     EITEM WA_Activate
  1236.     EITEM WA_RMBTrap
  1237.     EITEM WA_WBenchWindow    ; PRIVATE!!
  1238.     EITEM WA_SimpleRefresh    ; only specify if TRUE
  1239.     EITEM WA_SmartRefresh    ; only specify if TRUE
  1240.     EITEM WA_SizeBRight
  1241.     EITEM WA_SizeBBottom
  1242.  
  1243.     ; New Boolean properties
  1244.     EITEM WA_AutoAdjust    ; shift or squeeze the window's position and
  1245.             ; dimensions to fit it on screen.
  1246.  
  1247.     EITEM WA_GimmeZeroZero    ; equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO
  1248.  
  1249.     ; New for V37: WA_MenuHelp (ignored by V36)
  1250.     EITEM WA_MenuHelp    ; Enables IDCMP_MENUHELP:  Pressing HELP during menus
  1251.             ; will return IDCMP_MENUHELP IDCMP message.
  1252.  
  1253.     ; New for V39:  (ignored by V37 and earlier)
  1254.     EITEM WA_NewLookMenus
  1255.             ; Set to TRUE if you want NewLook menus
  1256.  
  1257.     EITEM WA_AmigaKey    ; Pointer to image for Amiga-key equiv in menus
  1258.  
  1259.     EITEM WA_NotifyDepth
  1260.             ; Requests IDCMP_CHANGEWINDOW message when
  1261.             ; window is depth arranged
  1262.             ; (imsg->Code = CWCODE_DEPTH)
  1263.  
  1264.     EITEM WA_Obsolete
  1265.  
  1266.     EITEM WA_Pointer
  1267.             ; Allows you to specify a custom pointer
  1268.             ; for your window.  ti_Data points to a
  1269.             ; pointer object you obtained via
  1270.             ; "pointerclass". NULL signifies the
  1271.             ; default pointer.
  1272.             ; This tag may be passed to OpenWindowTags()
  1273.             ; or SetWindowPointer().
  1274.  
  1275.     EITEM WA_BusyPointer
  1276.             ; ti_Data is boolean.  Set to TRUE to
  1277.             ; request the standard busy pointer.
  1278.             ; This tag may be passed to OpenWindowTags()
  1279.             ; or SetWindowPointer().
  1280.  
  1281.     EITEM WA_PointerDelay
  1282.             ; ti_Data is boolean.  Set to TRUE to
  1283.             ; request that the changing of the
  1284.             ; pointer be slightly delayed.    The change
  1285.             ; will be called off if you call NewSetPointer()
  1286.             ; before the delay expires.  This allows
  1287.             ; you to post a busy-pointer even if you think
  1288.             ; the busy-time may be very short, without
  1289.             ; fear of a flashing pointer.
  1290.             ; This tag may be passed to OpenWindowTags()
  1291.             ; or SetWindowPointer().
  1292.  
  1293.     EITEM WA_TabletMessages
  1294.             ; ti_Data is a boolean.  Set to TRUE to
  1295.             ; request that tablet information be included
  1296.             ; in IntuiMessages sent to your window.
  1297.             ; Requires that something (i.e. a tablet driver)
  1298.             ; feed IESUBCLASS_NEWTABLET InputEvents into
  1299.             ; the system.  For a pointer to the TabletData,
  1300.             ; examine the ExtIntuiMessage->eim_TabletData
  1301.             ; field.  It is UNSAFE to check this field
  1302.             ; when running on pre-V39 systems.  It's always
  1303.             ; safe to check this field under V39 and up,
  1304.             ; though it may be NULL.
  1305.  
  1306.     EITEM WA_HelpGroup
  1307.             ; When the active window has gadget help enabled,
  1308.             ; other windows of the same HelpGroup number
  1309.             ; will also get GadgetHelp.  This allows GadgetHelp
  1310.             ; to work for multi-windowed applications.
  1311.             ; Use GetGroupID() to get an ID number.  Pass
  1312.             ; this number as ti_Data to all your windows.
  1313.             ; See also the HelpControl() function.
  1314.  
  1315.     EITEM WA_HelpGroupWindow
  1316.             ; When the active window has gadget help enabled,
  1317.             ; other windows of the same HelpGroup will also get
  1318.             ; GadgetHelp.  This allows GadgetHelp to work
  1319.             ; for multi-windowed applications.  As an alternative
  1320.             ; to WA_HelpGroup, you can pass a pointer to any
  1321.             ; other window of the same group to join its help
  1322.             ; group.  Defaults to NULL, which has no effect.
  1323.             ; See also the HelpControl() function.
  1324.  
  1325.  
  1326. *** End of Window attribute enumeration ***
  1327.  
  1328.  
  1329. * HelpControl() flags:
  1330. *
  1331. * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more
  1332. * windows.
  1333.  
  1334. HC_GADGETHELP    EQU    1
  1335.  
  1336.  
  1337.     IFND INTUITION_SCREENS_I
  1338.     INCLUDE "intuition/screens.i"
  1339.     ENDC
  1340.  
  1341.     IFND INTUITION_PREFERENCES_I
  1342.     INCLUDE "intuition/preferences.i"
  1343.     ENDC
  1344.  
  1345. ; ========================================================================
  1346. ; === Remember ===========================================================
  1347. ; ========================================================================
  1348. ; this structure is used for remembering what memory has been allocated to
  1349. ; date by a given routine, so that a premature abort or systematic exit
  1350. ; can deallocate memory cleanly, easily, and completely
  1351.  STRUCTURE Remember,0
  1352.  
  1353.     APTR rm_NextRemember
  1354.     LONG rm_RememberSize
  1355.     APTR rm_Memory
  1356.  
  1357.  LABEL    rm_SIZEOF
  1358.  
  1359. * How to tell Intuition about RGB values for a color table entry.
  1360. * NOTE:  The way the structure was defined, the color value was
  1361. * right-justified within each UWORD.  This poses problems for
  1362. * extensibility to more bits-per-gun.  The SA_Colors32 tag to
  1363. * OpenScreenTags() provides an alternate way to specify colors
  1364. * with greater precision.
  1365.  
  1366.  STRUCTURE ColorSpec,0
  1367.  
  1368.     WORD cs_ColorIndex    ; -1 terminates an array of ColorSpec
  1369.     UWORD cs_Red    ; only the _bottom_ 4 bits recognized
  1370.     UWORD cs_Green    ; only the _bottom_ 4 bits recognized
  1371.     UWORD cs_Blue    ; only the _bottom_ 4 bits recognized
  1372.  LABEL    cs_SIZEOF
  1373.  
  1374. * === Easy Requester Specification ======================================= *
  1375. * see also autodocs for EasyRequest and BuildEasyRequest
  1376. * NOTE: This structure may grow in size in the future
  1377.  
  1378.  STRUCTURE EasyStruct,0
  1379.  
  1380.     ULONG es_StructSize        ; should be EasyStruct_SIZEOF
  1381.     ULONG es_Flags        ; should be 0 for now
  1382.     APTR  es_Title        ; title of requester window
  1383.     APTR  es_TextFormat        ; 'printf' style formatting string
  1384.     APTR  es_GadgetFormat    ; 'printf' style formatting string
  1385.  LABEL    EasyStruct_SIZEOF    ; was es_SIZEOF, but we renamed it due
  1386.                  ; to an unfortunate collision with
  1387.                  ; graphics ExtSprite's es_SIZEOF
  1388.  
  1389.  
  1390.  
  1391. ; ========================================================================
  1392. ; === Miscellaneous ======================================================
  1393. ; ========================================================================
  1394.  
  1395. ; = MACROS ==============================================================
  1396. ;#define MENUNUM(n) (n & 0x1F)
  1397. ;#define ITEMNUM(n) ((n >> 5) & 0x003F)
  1398. ;#define SUBNUM(n) ((n >> 11) & 0x001F)
  1399. ;
  1400. ;#define SHIFTMENU(n) (n & 0x1F)
  1401. ;#define SHIFTITEM(n) ((n & 0x3F) << 5)
  1402. ;#define SHIFTSUB(n) ((n & 0x1F) << 11)
  1403. ;
  1404. ;#define SRBNUM(n)  (0x08 - (n >> 4))  /* SerRWBits -> read bits per char */
  1405. ;#define SWBNUM(n)  (0x08 - (n & 0x0F))/* SerRWBits -> write bits per chr */
  1406. ;#define SSBNUM(n)  (0x01 + (n >> 4))  /* SerStopBuf -> stop bits per chr */
  1407. ;#define SPARNUM(n) (n >> 4)           /* SerParShk -> parity setting     */
  1408. ;#define SHAKNUM(n) (n & 0x0F)           /* SerParShk -> handshake mode     */
  1409. ;
  1410. ; = MENU STUFF ===========================================================
  1411. NOMENU EQU    $001F
  1412. NOITEM EQU    $003F
  1413. NOSUB  EQU    $001F
  1414. MENUNULL EQU    $FFFF
  1415.  
  1416.  
  1417. ; = =RJ='s peculiarities ================================================= 
  1418. ;#define FOREVER for(;;)
  1419. ;#define SIGN(x) ( ((x) > 0) - ((x) < 0) )
  1420.  
  1421.  
  1422. ; these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  1423. ; I'll use a generic Width (for all resolutions) for the CheckMark.
  1424. ; If COMMSEQ, likewise I'll use this generic stuff
  1425. CHECKWIDTH    EQU    19
  1426. COMMWIDTH    EQU    27
  1427. LOWCHECKWIDTH    EQU    13
  1428. LOWCOMMWIDTH    EQU    16
  1429.  
  1430.  
  1431. ; these are the AlertNumber defines.  if you are calling DisplayAlert()
  1432. ; the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1433. ; of these patterns
  1434. ALERT_TYPE    EQU    $80000000
  1435. RECOVERY_ALERT    EQU    $00000000    ; the system can recover from this 
  1436. DEADEND_ALERT     EQU    $80000000    ; no recovery possible, this is it 
  1437.  
  1438.  
  1439. ; When you're defining IntuiText for the Positive and Negative Gadgets
  1440. ; created by a call to AutoRequest(), these defines will get you
  1441. ; reasonable-looking text.  The only field without a define is the IText
  1442. ; field; you decide what text goes with the Gadget
  1443. AUTOFRONTPEN    EQU    0
  1444. AUTOBACKPEN    EQU    1
  1445. AUTODRAWMODE    EQU    RP_JAM2
  1446. AUTOLEFTEDGE    EQU    6
  1447. AUTOTOPEDGE    EQU    3
  1448. AUTOITEXTFONT    EQU    0
  1449. AUTONEXTTEXT    EQU    0
  1450.  
  1451.  
  1452.  
  1453. ;* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) -------------------
  1454. SELECTUP    EQU    (IECODE_LBUTTON+IECODE_UP_PREFIX)
  1455. SELECTDOWN    EQU    (IECODE_LBUTTON)
  1456. MENUUP        EQU    (IECODE_RBUTTON+IECODE_UP_PREFIX)
  1457. MENUDOWN    EQU    (IECODE_RBUTTON)
  1458. MIDDLEUP    EQU    (IECODE_MBUTTON+IECODE_UP_PREFIX)
  1459. MIDDLEDOWN    EQU    (IECODE_MBUTTON)
  1460. ALTLEFT        EQU    (IEQUALIFIER_LALT)
  1461. ALTRIGHT    EQU    (IEQUALIFIER_RALT)
  1462. AMIGALEFT    EQU    (IEQUALIFIER_LCOMMAND)
  1463. AMIGARIGHT    EQU    (IEQUALIFIER_RCOMMAND)
  1464. AMIGAKEYS    EQU    (AMIGALEFT+AMIGARIGHT)
  1465.  
  1466. CURSORUP    EQU    $4C
  1467. CURSORLEFT    EQU    $4F
  1468. CURSORRIGHT    EQU    $4E
  1469. CURSORDOWN    EQU    $4D
  1470. KEYCODE_Q    EQU    $10
  1471. KEYCODE_Z    EQU    $31
  1472. KEYCODE_X    EQU    $32
  1473. KEYCODE_V    EQU    $34
  1474. KEYCODE_B    EQU    $35
  1475. KEYCODE_N    EQU    $36
  1476. KEYCODE_M    EQU    $37
  1477. KEYCODE_LESS    EQU    $38
  1478. KEYCODE_GREATER    EQU    $39
  1479.  
  1480.  
  1481.  
  1482. * New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass
  1483. * of the IECLASS_NEWPOINTERPOS event.  The ie_EventAddress of such
  1484. * an event points to a TabletData structure (see <devices/inputevent.i>
  1485. * for the definition.)
  1486. *
  1487. * The TabletData structure contains certain elements including a taglist.
  1488. * The taglist can be used for special tablet parameters.  A tablet driver
  1489. * should include only those tag-items the tablet supports.  An application
  1490. * can listen for any tag-items that interest it.  Note: an application
  1491. * must set the WA_TabletMessages attribute to TRUE to receive this
  1492. * extended information in its IntuiMessages.
  1493. *
  1494. * The definitions given here MUST be followed.    Pay careful attention
  1495. * to normalization and the interpretation of signs.
  1496. *
  1497. * TABLETA_TabletZ:  the current value of the tablet in the Z direction.
  1498. * This unsigned value should typically be in the natural units of the
  1499. * tablet.  You should also provide TABLETA_RangeZ.
  1500. *
  1501. * TABLETA_RangeZ:  the maximum value of the tablet in the Z direction.
  1502. * Normally specified along with TABLETA_TabletZ, this allows the
  1503. * application to scale the actual Z value across its range.
  1504. *
  1505. * TABLETA_AngleX:  the angle of rotation or tilt about the X-axis.  This
  1506. * number should be normalized to fill a signed long integer.  Positive
  1507. * values imply a clockwise rotation about the X-axis when viewing
  1508. * from +X towards the origin.
  1509. *
  1510. * TABLETA_AngleY:  the angle of rotation or tilt about the Y-axis.  This
  1511. * number should be normalized to fill a signed long integer.  Positive
  1512. * values imply a clockwise rotation about the Y-axis when viewing
  1513. * from +Y towards the origin.
  1514. *
  1515. * TABLETA_AngleZ:  the angle of rotation or tilt about the Z axis.  This
  1516. * number should be normalized to fill a signed long integer.  Positive
  1517. * values imply a clockwise rotation about the Z-axis when viewing
  1518. * from +Z towards the origin.
  1519. *
  1520. *    Note: a stylus that supports tilt should use the TABLETA_AngleX
  1521. *    and TABLETA_AngleY attributes.    Tilting the stylus so the tip
  1522. *    points towards increasing or decreasing X is actually a rotation
  1523. *    around the Y-axis.  Thus, if the stylus tip points towards
  1524. *    positive X, then that tilt is represented as a negative
  1525. *    TABLETA_AngleY.  Likewise, if the stylus tip points towards
  1526. *    positive Y, that tilt is represented by positive TABLETA_AngleX.
  1527. *
  1528. * TABLETA_Pressure:  the pressure reading of the stylus.  The pressure
  1529. * should be normalized to fill a signed long integer.  Typical devices
  1530. * won't generate negative pressure, but the possibility is not precluded.
  1531. * The pressure threshold which is considered to cause a button-click is
  1532. * expected to be set in a Preferences program supplied by the tablet
  1533. * vendor.  The tablet driver would send IECODE_LBUTTON-type events as
  1534. * the pressure crossed that threshold.
  1535. *
  1536. * TABLETA_ButtonBits:  ti_Data is a long integer whose bits are to
  1537. * be interpreted at the state of the first 32 buttons of the tablet.
  1538. *
  1539. * TABLETA_InProximity:  ti_Data is a boolean.  For tablets that support
  1540. * proximity, they should send the {TABLETA_InProximity,FALSE} tag item
  1541. * when the stylus is out of proximity.  One possible use we can forsee
  1542. * is a mouse-blanking commodity which keys off this to blank the
  1543. * mouse.  When this tag is absent, the stylus is assumed to be
  1544. * in proximity.
  1545. *
  1546. * TABLETA_ResolutionX:  ti_Data is an unsigned long integer which
  1547. * is the x-axis resolution in dots per inch.
  1548. *
  1549. * TABLETA_ResolutionY:  ti_Data is an unsigned long integer which
  1550. * is the y-axis resolution in dots per inch.
  1551.  
  1552. TABLETA_Dummy        EQU    TAG_USER+$3A000
  1553. TABLETA_TabletZ        EQU    TABLETA_Dummy+$01
  1554. TABLETA_RangeZ        EQU    TABLETA_Dummy+$02
  1555. TABLETA_AngleX        EQU    TABLETA_Dummy+$03
  1556. TABLETA_AngleY        EQU    TABLETA_Dummy+$04
  1557. TABLETA_AngleZ        EQU    TABLETA_Dummy+$05
  1558. TABLETA_Pressure    EQU    TABLETA_Dummy+$06
  1559. TABLETA_ButtonBits    EQU    TABLETA_Dummy+$07
  1560. TABLETA_InProximity    EQU    TABLETA_Dummy+$08
  1561. TABLETA_ResolutionX    EQU    TABLETA_Dummy+$09
  1562. TABLETA_ResolutionY    EQU    TABLETA_Dummy+$0A
  1563.  
  1564.  
  1565. * If your window sets WA_TabletMessages to TRUE, then it will receive
  1566. * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData
  1567. * field points at a TabletData structure.  This structure contains
  1568. * additional information about the input event.
  1569.  
  1570.  STRUCTURE TabletData,0
  1571.     ; Sub-pixel position of tablet, in screen coordinates,
  1572.     ; scaled to fill a UWORD fraction:
  1573.     UWORD td_XFraction
  1574.     UWORD td_YFraction
  1575.  
  1576.     ; Current tablet coordinates along each axis:
  1577.     ULONG td_TabletX
  1578.     ULONG td_TabletY
  1579.  
  1580.     ; Tablet range along each axis.  For example, if td_TabletX
  1581.     ; can take values 0-999, td_RangeX should be 1000.
  1582.     ULONG td_RangeX
  1583.     ULONG td_RangeY
  1584.  
  1585.     ; Pointer to tag-list of additional tablet attributes.
  1586.     ; See <intuition/intuition.i> for the tag values.
  1587.     APTR td_TagList
  1588.  
  1589.     LABEL td_SIZEOF
  1590.  
  1591. * If a tablet driver supplies a hook for ient_CallBack, it will be
  1592. * invoked in the standard hook manner.  A0 will point to the Hook
  1593. * itself, A2 will point to the InputEvent that was sent, and
  1594. * A1 will point to a TabletHookData structure.  The InputEvent's
  1595. * ie_EventAddress field points at the IENewTablet structure that
  1596. * the driver supplied.
  1597. *
  1598. * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  1599. * should scale the ient_TabletX and ient_TabletY fields and store the
  1600. * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  1601. * ient_ScaledYFraction.
  1602. *
  1603. * The tablet hook must currently return NULL.  This is the only
  1604. * acceptable return-value under V39.
  1605.  
  1606.  STRUCTURE TabletHookData,0
  1607.  
  1608.     ; Pointer to the active screen:
  1609.     ; Note: if there are no open screens, thd_Screen will be NULL.
  1610.     ; thd_Width and thd_Height will then describe an NTSC 640x400
  1611.     ; screen.  Please scale accordingly.
  1612.     APTR thd_Screen
  1613.  
  1614.     ; The width and height (measured in pixels of the active screen)
  1615.     ; that your are to scale to:
  1616.     ULONG thd_Width
  1617.     ULONG thd_Height
  1618.  
  1619.     ; Non-zero if the screen or something about the screen
  1620.     ; changed since the last time you were invoked:
  1621.     LONG thd_ScreenChanged
  1622.  
  1623.     LABEL thd_SIZEOF
  1624.  
  1625.     IFND    INTUITION_INTUITIONBASE_I
  1626.     INCLUDE    "intuition/intuitionbase.i"
  1627.     ENDC
  1628.  
  1629. * Include obsolete identifiers:
  1630.     IFND    INTUITION_IOBSOLETE_I
  1631.     INCLUDE "intuition/iobsolete.i"
  1632.     ENDC
  1633.  
  1634.     ENDC
  1635.